package com.wzw.springboot.principle.use.datasource;

import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Wangzhiwen
 */
@Configuration
@ConfigurationProperties(prefix = "spring.datasource")
public class DynamicDatasourceProperties {

    private Map<String, DataSourceProperties> dynamic = new HashMap<>();

    public DynamicDatasourceProperties() {
    }

    public Map<String, DataSourceProperties> getDynamic() {
        return dynamic;
    }

    public void setDynamic(Map<String, DataSourceProperties> dynamic) {
        this.dynamic = dynamic;
    }
}
